package com.gobang.domain.message;

import lombok.*;

import java.io.Serializable;

/**
 * WebSocket游戏状态请求消息
 * 用于客户端请求游戏状态
 * 
 * @author System
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class GameStateRequestMessage extends WebSocketMessage {

    private static final long serialVersionUID = 1L;

    /**
     * 游戏状态更新数据
     */
    private GameStateRequestData data;

    /**
     * 游戏状态更新数据内部类
     */
    @Data
    @AllArgsConstructor
    @Builder
    public static class GameStateRequestData {
        /**
         * 房间ID
         */
        private String roomId;

        /**
         * 时间戳
         */
        private Long timestamp;

        public GameStateRequestData() {
            this.timestamp = System.currentTimeMillis();
        }
    }

    /**
     * 构造函数
     */
    public GameStateRequestMessage(GameStateRequestData data) {
        super("REQUEST_GAME_STATE");
        this.data = data;
    }

} 